# DP: Build and install libstdc++_pic.a library.

---
 libstdc++-v3/src/Makefile.am |    4 ++++
 libstdc++-v3/src/Makefile.in |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

--- a/src/libstdc++-v3/src/Makefile.am
+++ b/src/libstdc++-v3/src/Makefile.am
@@ -352,6 +352,10 @@ CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
 
 
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Added bits to build debug library.
 if GLIBCXX_BUILD_DEBUG
 all-local: build_debug
--- a/src/libstdc++-v3/src/Makefile.in
+++ b/src/libstdc++-v3/src/Makefile.in
@@ -726,7 +726,7 @@ info-am:
 
 install-data-am: install-data-local
 
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
 
 install-info: install-info-am
 
@@ -759,6 +759,7 @@ uninstall-am: uninstall-info-am uninstall-toolexeclibLTLIBRARIES
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-data-local install-exec \
+	install-exec-local \
 	install-exec-am install-info install-info-am install-man \
 	install-strip install-toolexeclibLTLIBRARIES installcheck \
 	installcheck-am installdirs maintainer-clean \
@@ -942,6 +943,11 @@ build_debug: stamp-debug
 install_debug:
 	(cd ${debugdir} && $(MAKE) \
 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
